const {
	Service
} = require('uni-cloud-router')
const uniID = require('uni-id')
module.exports = class HotelService extends Service {
		async searchHotel({ location, number, district }) {
			const res = await db.collection('hotel')
		  .where({
		    city: location,
				number: dbCmd.lt(number)
		  }).get()
		  .then((res)=>{
		    // res 为数据库查询结果
				console.log(res)
		  }).catch((err)=>{
		    console.log(err.code); // 打印错误码
		        console.log(err.message); // 打印错误内容
		  })
			if (res.code) {
				return res
			}
			
		}
}